<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "employee_department".
 *
 * @property integer $id
 * @property integer $employee_id
 * @property string $employee_number
 * @property string $employee_name
 * @property integer $department_id
 * @property string $department_number
 * @property string $department_name
 * @property string $department_display_name
 * @property integer $level
 * @property integer $hr_status
 * @property integer $qywx_status
 * @property string $created_by
 * @property string $created_at
 * @property string $updated_by
 * @property string $updated_at
 */
class EmployeeDepartment extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'employee_department';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['employee_id', 'department_id'], 'required'],
            [['employee_id', 'department_id', 'level', 'hr_status', 'qywx_status'], 'integer'],
            [['created_at', 'updated_at'], 'safe'],
            [['employee_number', 'employee_name', 'department_number', 'created_by', 'updated_by'], 'string', 'max' => 45],
            [['department_name', 'department_display_name'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'employee_id' => Yii::t('app', 'Employee ID'),
            'employee_number' => Yii::t('app', 'Employee Number'),
            'employee_name' => Yii::t('app', 'Employee Name'),
            'department_id' => Yii::t('app', 'Department ID'),
            'department_number' => Yii::t('app', 'Department Number'),
            'department_name' => Yii::t('app', 'Department Name'),
            'department_display_name' => Yii::t('app', 'Department Display Name'),
            'level' => Yii::t('app', 'Level'),
            'hr_status' => Yii::t('app', 'Hr Status'),
            'qywx_status' => Yii::t('app', 'Qywx Status'),
            'created_by' => Yii::t('app', 'Created By'),
            'created_at' => Yii::t('app', 'Created At'),
            'updated_by' => Yii::t('app', 'Updated By'),
            'updated_at' => Yii::t('app', 'Updated At'),
        ];
    }
}
